const mysql=require('mysql');

var con=mysql.createConnection({
    host:"192.168.164.144",
    port:3306,
    user:"root",
    password:"ddd",
    database:"mysqlbase"
})

var title=process.argv[2];
var time=process.argv[3];
var num=process.argv[4];
var article=process.argv[5];

var insertSql="insert into user values(?,?,?,?,?)";
var primarykey=(new Date()).getTime();
con.query(insertSql,[title,time,num,article,primarykey],(err,result)=>{
    if(err){
        console.log(err)
    }else{
        console.log(result)
    }
})